function getstyle(obj, name) {
	if (obj.currentStyle) {
		return obj.currentStyle[name];
	} else {
		return getComputedStyle(obj, null)[name];
	}
}

function startmove(obj, attr, itarget) {
	clearInterval(obj.timer);

	obj.timer = setInterval(function() {
				var curr = 0;
				if (attr == 'opacity') {
					curr = Math.round(parseFloat(getstyle(obj, attr)) * 100);
				} else {
					curr = parseInt(getstyle(obj, attr));
				}
				var speed = (itarget - curr) / 6;
				speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);

				if (curr == itarget) {
					clearInterval(obj.timer);
				} else {
					if (attr == 'opacity') {
						obj.style.filter = 'alpha(opacity:' + curr + speed
								+ ')';
						obj.style.opacity = (curr + speed) / 100;
					} else {
						obj.style[attr] = curr + speed + 'px';
					}
				}
			}, 30);
}
